package com.zlg.service.impl;

import java.util.List;

import org.apache.catalina.mbeans.UserMBean;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.zlg.entity.Users;
import com.zlg.mapper.UsersMapper;
import com.zlg.service.UsersService;

@Service
@Transactional
public class UsersServiceImpl implements UsersService{
	@Autowired
	private UsersMapper usersMapper;

	public void addUser(Users users) {
		usersMapper.insertUser(users);
	}

	@Override
	public List<Users> findUsersAll() {
		return usersMapper.selectUsersAll();
	}

	@Override
	public Users findUserById(Integer id) {
		return usersMapper.findUserById(id);
	}

	@Override
	public void updateUser(Users users) {
		usersMapper.updateUser(users);
	}

	@Override
	public void deleteUserById(Integer id) {
		usersMapper.deleteUserById(id);
	}
	
	

}
